package com.buba.springcloud.service.impl;

import com.buba.springcloud.dao.DiscountMapper;
import com.buba.springcloud.entities.HfCoupon;
import com.buba.springcloud.entities.HfCouponReceiveRecord;
import com.buba.springcloud.service.DiscountService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class DiscountServiceImpl implements DiscountService {
    @Resource
    private DiscountMapper discountMapper;
    @Override
    public List<HfCoupon> finddiscount(Integer id , Integer status) {
        return discountMapper.finddiscount(id , status);
    }

    @Override
    public HfCouponReceiveRecord finddiscountById(Integer id , Integer cid) {
        return discountMapper.finddiscountById(id,cid);
    }

    @Override
    public void getCoupon(Integer id, Integer cid) {
        discountMapper.getCoupon(id,cid);

    }

    @Override
    public HfCoupon findCouponById(Integer cid) {
        return discountMapper.findCouponById(cid);
    }

    @Override
    public void Inventorydecline(long resid , Integer cid) {
        discountMapper.Inventorydecline(resid,cid);
    }

    @Override
    public List<HfCoupon> findCouponByUid(Integer id) {
        return discountMapper.findCouponByUid(id);
    }
}
